Solved: Convert character to date

您所在的位置:网站首页 sas how to convert character variable to date Solved: Convert character to date

Solved: Convert character to date

2024-01-09 14:14| 来源: 网络整理| 查看: 265

Note about the solution, the difficulty was caused by hidden characters in the variable "Mark_App_s ", which was imported from an online database.  Prior to implementing the above solution, I had to parse the variable using a SUBSTRING into MM, DD, YYYY components, Then tried converting each to a numeric variable.  If it would not convert using an INPUT function, that indicated there were hidden characters, and I continued to use the SUBSTRING function until the numeric conversion method worked.  Only then could the 

 

Mark_App_d  =     mdy(Month_2,Day,Year)       

 

function be used to convert the character variables (Month_2,Day,Year) to a SAS Date.

 

Thanks again for your assistance !

 



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3